package com.sea.operate.service.impl;


import com.sea.operate.entity.RelatedMaterial;
import com.sea.operate.entity.RelatedMaterialDetail;
import com.sea.operate.mapper.RelatedMaterialDetailMapper;
import com.sea.operate.mapper.RelatedMaterialMapper;
import com.sea.operate.service.RelatedMaterialDetailService;
import com.sea.operate.service.RelatedMaterialService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @author 陈鸿飞
 */
@Service
public class RelatedMaterialDetailServiceImpl implements RelatedMaterialDetailService {

    @Autowired
    private RelatedMaterialDetailMapper relatedMaterialDetailMapper;

    @Override
    public List<RelatedMaterialDetail> findByCnd(RelatedMaterialDetail relatedMaterialDetail) {
        return relatedMaterialDetailMapper.findByCnd(relatedMaterialDetail);
    }

    @Override
    public Integer save(RelatedMaterialDetail relatedMaterialDetail) {
        return relatedMaterialDetailMapper.insert(relatedMaterialDetail);
    }

    @Override
    public List<RelatedMaterialDetail> findByMaterialId(RelatedMaterialDetail relatedMaterialDetail) {
        return relatedMaterialDetailMapper.findByMaterialId(relatedMaterialDetail);
    }

    @Override
    public Integer usave(RelatedMaterialDetail relatedMaterialDetail) {
        return relatedMaterialDetailMapper.update(relatedMaterialDetail);
    }

    @Override
    public List<RelatedMaterialDetail> exportMaterialDetailByProduceId(Integer produceId) {
        return relatedMaterialDetailMapper.exportMaterialDetailByProduceId(produceId);
    }

    @Override
    public List<RelatedMaterialDetail> exportFnSkuByProduceId(Integer produceId) {
        return relatedMaterialDetailMapper.exportFnSkuByProduceId(produceId);
    }
}
